home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _IEFormSubmit.au3 < prev    next >
Text File  |  2006-07-14  |  944b  |  22 lines

  1. ; *******************************************************
  2. ; Example 1 - Open a browser with the form example, fill in a form field and submit the form
  3. ; *******************************************************
  4. ;
  5. #include <IE.au3>
  6. $oIE = _IE_Example ("form")
  7. $oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
  8. $oText = _IEFormElementGetObjByName ($oForm, "textExample")
  9. _IEFormElementSetValue ($oText, "Hey! It works!")
  10. _IEFormSubmit ($oForm)
  11.  
  12. ; *******************************************************
  13. ; Example 2 - Get a reference to a specific form element and set its value.
  14. ;                In this case, submit a query to the Google search engine
  15. ; *******************************************************
  16. ;
  17. #include <IE.au3>
  18. $oIE = _IECreate ("http://www.google.com")
  19. $oForm = _IEFormGetObjByName ($oIE, "f")
  20. $oQuery = _IEFormElementGetObjByName ($oForm, "q")
  21. _IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
  22. _IEFormSubmit ($oForm)